Expand description
rsexpr
Small and simple S-expression parsing and manipulation with support for square-bracketed groups and strings. Used by syntastica for processing tree-sitter queries.
Have a look at Sexpr
, OwnedSexpr
, from_slice
, and from_slice_multi
for more
information.
Features
-
comments
— Include comments in the parsed tree and pretty-printed output -
docs
— Meant to be enabled when building docs
Structs
- A thin wrapper around
Vec<OwnedSexpr>
with its ownDisplay
implementation. SeeOwnedSexpr
for more information.
Enums
- The crate error type.
- A kind of parentheses. Used in
Error::MissingClosingParen
andError::ExtraClosingParen
to indicate the kind of parentheses that caused the error. - A single node of the tree. The
Atom
andString
variants reference the input slice. For an owned version have a look atOwnedSexpr
.
Functions
- Parse a
Sexpr
from bytes. This fails if there is more than one S-expression in the input. To allow an arbitrary amount of S-expressions, have a look atfrom_slice_multi
. - Parse multiple
Sexpr
s from bytes. To only parse a single one, have a look atfrom_slice
.
Type Definitions
- The default result type. The error variant is a vector of
Error
s